/*
 * AssemblerApplication2.asm
 *
 *  Created: 2/8/2015 5:02:15 PM
 *   Author: Dahunter07
 */ 


 ldi r16, 0			;clear registers
 ldi r20, 0

 ldi R16, 35		;load 35 to register 1
 ldi R20, 37		;load 37 to register 2
 add R16, R20		;add 35 and 37 to register 1
 
 ldi R20, 40		;load 40 to register 2
 add R16, R20		;add 40 to sum

 ldi R20, 45		;load 45 to register 2
 add R16, R20		;add 45 to sum

 ldi R20, 50		;load 50 to register 2
 add R16, R20		;add 50 to sum

 ldi R19, 0			;load 0 to resgister
 out portb, R19	;set portb2 to 0
 brvc done			;jump to done if overflow is 0

 ldi R19, 1			;if overflow is 1, load 1 to register
 out portb, R19	;set portb2 to 1

 done:				;done